package hw858270.lesson1;

public class JavaLession1 {
	public static void main(String[] args) {
		printInt(1,100,1);
		System.out.println();
		printInt1(1,100,1);
		System.out.println();
		printInt2(1,100,1);
	}

	private static void printInt(int startInt,int endInt,int interval ) {
//		for(int i=startInt;i<=endInt;i+=interval){
//			System.out.print(i+",");
//		}
		
		int start=startInt;
		while(start<=endInt){
			System.out.print(start+",");
			start+=interval;
		}
	}
	private static void printInt1(int startInt,int endInt,int interval ) {
		for(int i=startInt;i<=endInt;i+=interval){
			if(i==47){
				break;
			}
			System.out.print(i+",");
		}
	}
	private static void printInt2(int startInt,int endInt,int interval ) {
		for(int i=startInt;i<=endInt;i+=interval){
			if(i==47){
				return;
			}
			System.out.print(i+",");
		}
	}
}
